package com.aiyige.base.eventbus;

import com.aiyige.base.db.table.LearnVideoModel;

/**
 * Created by zhuyakun on 2017/12/6.
 */

public class EventEditLearnVideoFinish {
    public static final int RESULT_OK = 1;
    public static final int RESULT_CANCEL = 2;
    int resultCode;
    LearnVideoModel learnVideoModel;

    private EventEditLearnVideoFinish(Builder builder) {
        setResultCode(builder.resultCode);
        setLearnVideoModel(builder.learnVideoModel);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }

    public LearnVideoModel getLearnVideoModel() {
        return learnVideoModel;
    }

    public void setLearnVideoModel(LearnVideoModel learnVideoModel) {
        this.learnVideoModel = learnVideoModel;
    }

    public static final class Builder {
        private int resultCode;
        private LearnVideoModel learnVideoModel;

        private Builder() {
            resultCode = RESULT_CANCEL;
            learnVideoModel = null;
        }

        public Builder resultCode(int resultCode) {
            this.resultCode = resultCode;
            return this;
        }

        public Builder learnVideoModel(LearnVideoModel learnVideoModel) {
            this.learnVideoModel = learnVideoModel;
            return this;
        }

        public EventEditLearnVideoFinish build() {
            return new EventEditLearnVideoFinish(this);
        }
    }
}
